from pymysql import Connection

conn = Connection(
    host="localhost",
    port=3306,
    user='root',
    password='admin',
    autocommit=True
)

cursor = conn.cursor()

conn.select_db("excel")

cursor.execute("select * from budget_monitor")

results: tuple = cursor.fetchall()

for r in results:
    print(r)

conn.close()